package org.jeecg.modules.activity.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface ActivityCommonMapper {

    /**
     * 获取流程审批记录
     * @param procInstId
     * @return
     */
    @Select("SELECT node_name as lchdmc, owner_name as spr, serial FROM act_z_task t WHERE " +
            " t.proc_inst_id = #{procInstId} AND t.node_state = 1 ORDER BY create_time")
    List<Map<String,Object>> getNodeList(@Param("procInstId") String procInstId);

    /**
    * @Description 获取流程审批记录通过创建时间倒序排列
    * @author  wujinbiao
    * @date 2022/3/14
    * @param procInstId
    * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    */

    @Select("SELECT * FROM act_z_task t WHERE " +
            " t.proc_inst_id = #{procInstId} ORDER BY create_time DESC")
    List<Map<String, Object>> getNodeListDesc(String procInstId);
}
